{include file="public/header"}
<body>
<fieldset class="layui-elem-field">
    <legend>管理员列表</legend>
    <div class="layui-field-box">
        <span class="layui-btn layui-btn-normal api-add"><i class="layui-icon">&#xe608;</i> 添加菜单</span>
        <table class="layui-table" lay-even>
            <thead>
            <tr>
                <th>编号</th>
                <th>名称</th>
                <th>上级菜单</th>
                <th>地址</th>
                <th>类型</th>
                <th>排序</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            {volist name="list" id="vo"}
            <tr>
                <td>{$vo["id"]}</td>
                <td>{$vo['name']}</td>
                <td>{$vo['fid']}</td>
                <td>{$vo['url']}</td>
                <td>{$vo['type']}</td>
                <td>{$vo['sort']}</td>
                <td>
                    <span class="layui-btn layui-btn-danger confirm" data-id="{$vo['id']}" data-info="你确定该管理员么？" data-url="{:url('del')}">删除</span>
                    <span class="layui-btn layui-btn-normal confirm" data-id="{$vo['id']}" data-info="你确定该管理员么？" data-url="{:url('edit')}">编辑</span>

                </td>
            </tr>
            {/volist}
            </tbody>
        </table>
        <div>{$list->render()}</div>
    </div>
</fieldset>


{include file="public/footer"}

<script>
    layui.use('form', function(){
        var form = layui.form();
        form.on('submit(admin-form)', function(data){
            var params  = {
                url: '{:url("profit")}',
                data: data.field,
                type: 'post',

                sCallback:function(res){
                    dialog.success(res.msg);
                }
            };
            common.request(params);
            return false;
        });

    });
</script>
</body>
</html>